package com.gph.saviorframework.os.authz.web.controller.token;

import com.gph.saviorframework.Constants;
import com.gph.saviorframework.SaviorFrameworkException;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * Created by guopeihui on 2017/2/16.
 */
@Controller
@RequestMapping("/"+ Constants.FRAMEWORK_REQUEST_PATH+"/token/page")
public class TokenPageController {

    /** 领域对象名称 */
    private static final String domain = "token";

    /** 视图前缀 */
    private static final String viewPrefix = domain + "/" + domain + "_";

    @RequestMapping(value = "/index", method = RequestMethod.GET)
    public String indexPage() throws SaviorFrameworkException {
        return viewPrefix + "index";
    }

    @RequestMapping(value = "/create", method = RequestMethod.GET)
    public String createPage() throws SaviorFrameworkException {
        return viewPrefix + "create";
    }

    @RequestMapping(value = "/edit", method = RequestMethod.GET)
    public String editPage() throws SaviorFrameworkException {
        return viewPrefix + "edit";
    }

    @RequestMapping(value = "/view", method = RequestMethod.GET)
    public String viewPage() throws SaviorFrameworkException {
        return viewPrefix + "view";
    }
}
